﻿using ExpenseSystem.Common;
using ExpenseSystem.Core.DataAddOn;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Model;
using System.Web;

namespace ExpenseSystem.Core.InformationModules
{
    public abstract class InformationManager : ISystemManager<InformationModel>
    {
        protected InformationManager() { }
        public static InformationManager CreateInstance()
        {
            return new InformationBaseManager();
        }
        protected string tran = HttpContext.Current.Items[Definition.SESSION_TRAN_STR].ToString();

        protected SystemDataUpdater<InformationModel> updater = new InformationUpdaterRegister().GetInformationUpdater(); 
        public abstract bool Delete(InformationModel information,out string message);
        public abstract bool Save(InformationModel information,out string message, params IAddable<InformationModel>[] addables);

        public virtual bool DeleteById(long[] idArray,  out string message)
        {
            message = "不支持本方法";
            return false;
        }
    }
}
